package com.eastfair.venuebooking.api;

import com.eastfair.core.base.R;
import com.eastfair.venueservice.dto.ServiceSpecsDTO;
import com.eastfair.venueservice.vo.ServiceCategoryVO;
import com.eastfair.venueservice.vo.ServiceSpecsVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @Author lyw
 * @Date 2022/7/25 15:04
 */
@FeignClient(value = "venue-services-manage/serviceSpecs")
public interface ServiceSpecsFeign {

    /**
     * 根据服务分类id查询规格列表
     * @param categoryId
     * @return
     */
    @GetMapping(value = "/getServiceSpecsListByCategoryId/{categoryId}")
    R<List<ServiceSpecsVO>> getServiceSpecsListByCategoryId(@PathVariable("categoryId") Long categoryId);


    /**
     * 保存服务规格
     * @param serviceSpecsDTO
     * @return
     */
    @PostMapping(value = "/saveServiceSpecsInfo")
    R<Boolean> saveServiceSpecsInfo(@RequestBody ServiceSpecsDTO serviceSpecsDTO);


    /**
     * 删除规格
     * @param id
     * @return
     */
    @GetMapping(value = "/delServiceSpecsById/{id}")
    R<Boolean> delServiceSpecsById(@PathVariable("id") Long id);


    /**
     * 根据服务分类id查询规格列表
     * @param ids ids
     * @return R<List<ServiceSpecsVO>>
     */
    @PostMapping("/getServiceSpecsByIds")
    R<List<ServiceSpecsVO>> getServiceSpecsByIds(@RequestBody List<Long> ids);

}
